<?php

class Activation extends CI_Controller {
   
   private $data;
   
   public function __construct()
   {
	    parent::__construct();
		$this->load->model('system/user_m','user_m',TRUE);
		$this->load->helper('form');
		$this->load->helper('url');	
   }	
   public function activate(){
   
   
   }
   
   public function resend(){
        
		if(!empty($_POST)){
		    // Have submitted
			$this->load->library('form_validation');
			try {
			 	if($this->form_validation->run() == TRUE){
				    $username = $this->input->post('username');
					$email = $this->input->post('email');
				 
				    // Validate $username and $email
					$this->load->library('email');
					$this->email->from('your@example.com', 'Your Name');
					$this->email->to('someone@example.com');
					
					$this->email->send();

				}
			} catch(Exception $e){
				$error = $e->getMessage();
				$this->data['msgError'] = "Save Failed - ".$error;
			}	
		}
		
   		$this->data['baseUrl'] =  $this->config->item('base_url');
		$this->data['header'] = 'system/_template/header_anon_v';
		$this->data['content'] = 'system/activation/activation_v';
		$this->data['title'] = 'Account Activation';
		
		try{
			$this->load->view('system/_template/template_v', $this->data);
		}
		catch(Exception $e)
		{
			$this->load->helper('url');
			show_404();
		}
   }
   
}

?>